]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: Don't show pages until they need to be visible
authorJasper St. Pierre <jstpierre@mecheye.net>
Wed, 20 Nov 2013 17:06:14 +0000 (12:06 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Thu, 21 Nov 2013 17:50:03 +0000 (12:50 -0500)
AppDisplay queues a deferred work to load frequently used apps when the
apps page is loaded. Unfortunately, when the overview is first opened,
all the pages start out visible and then immediately get hidden, so the
deferred work runs immediately after the first overview opening, whether
the user was going to view their frequent apps or not.

Start all pages off as hidden, and rearrange the code so that pages are
only shown when they really need to be.

https://bugzilla.gnome.org/show_bug.cgi?id=712753

js/ui/viewSelector.js

index eef8c0a88b07eff535c143646defedea1e7c6a9f..0bc0f20af2f09e9a0187bd54845eae86176a831f 100644 (file)
@@ -157,17 +157,14 @@ const ViewSelector = new Lang.Class({
     },
 
     show: function() {
-        this._activePage = this._workspacesPage;
-
         this.reset();
-        this._appsPage.hide();
-        this._searchPage.hide();
+
         this._workspacesDisplay.show();
+        this._activePage = null;
+        this._showPage(this._workspacesPage);
 
         if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
             Main.overview.fadeOutDesktop();
-
-        this._showPage(this._workspacesPage, true);
     },
 
     zoomFromOverview: function() {
@@ -203,6 +200,7 @@ const ViewSelector = new Lang.Class({
                                                       this._a11yFocusPage(page);
                                                   })
                                             });;
+        page.hide();
         this.actor.add_actor(page);
         return page;
     },